<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      body,
      ul {
        margin: 0;
        padding: 0;
      }
      body {
        width: 100%;
        height: 100%;
        background-image: url(../images/grid.png);
      }
      svg {
        background-color: rgba(255, 0, 0, 0.1);
      }
      /* 第三种 */
      /* .rectangle {
        fill: green;
      } */
    </style>

    <link rel="stylesheet" href="./style.css" />
  </head>
  <body>
    <svg width="300" height="300">
      <!-- 第二种 -->
      <!-- <defs>
        <style>
          .rectangle {
            fill: green;
          }
        </style>
      </defs> -->
      <!-- 1.行内 -->
      <!-- <rect x="10" y="10" width="100" height="100" style="fill: red"></rect> -->
      <!-- <rect x="10" y="10" width="100" height="100" class="rectangle"></rect> -->

      <!-- <rect x="10" y="10" width="100" height="100" class="rectangle"></rect> -->
      <rect x="10" y="10" width="100" height="100" class="rectangle"></rect>
    </svg>
  </body>
</html>
